// ComponentHeader.jsx
import React from "react";
import { Row, Col } from "antd";
import "./ComponentHeader.css";

const ComponentHeader = ({
  title = "默认标题",
  extra = null,
  marginBottom = false,
}) => {
  return (
    <Row
      className={marginBottom ? "component-header" : ""}
      justify="space-between"
      align="middle"
    >
      <Col>
        <div className="component-header__title">{title}</div>
      </Col>
      <Col>{extra}</Col>
    </Row>
  );
};

export default ComponentHeader;
